<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
<title><?= $sf_response->getTitle() ?></title>
<?php use_stylesheet('/sf/sf_admin/css/main') ?>

<div id="sf_admin_container">

<h1>Exchange Rate of Currency</h1>

<?php  if ($sf_user->hasFlash('notice')): ?>
<div class="save-ok">
<h2><?php echo __($sf_user->getFlash('notice')) ?></h2>
</div>
<?php endif; ?>

<div id="sf_admin_content">
<fieldset>

<?php echo form_tag('po/RateCurrencyConfig', array(
  'id'        => 'sf_admin_edit_form',
  'name'      => 'sf_admin_edit_form',
  'multipart' => true,
  'onsubmit'=>'return requireFill()',
)) ?>
    
<div class="form-row">
    <?php echo label_for('USD -> VND', 'USD -> VND:', 'class="required" ') ?>
    <div class="content">
        <input type="text" name="usdvnd" id="usdvnd" value="<?php echo $usdvnd?>">
    </div>
</div>
    
<div class="form-row">
    <?php echo label_for('USD -> SGD', 'USD -> SGD:', 'class="required" ') ?>
    <div class="content">
        <input type="text" name="usdsgd" id="usdsgd" value="<?php echo $usdsgd?>">
    </div>
</div>

</fieldset>
    
<ul class="sf_admin_actions">
    <li>
        <?
        echo submit_tag(__('save'), array (
              'name' => 'save',
              'class' => 'sf_admin_action_save',
            )) ;
            ?>
    </li>
</ul>
</form>
</div>
</div>
<script language="JavaScript">
function requireFill(){
    var usdvnd = document.getElementById('usdvnd');
    if (!usdvnd.value){
        alert ('Please enter the data!');
        usdvnd.focus();
        return false;
    }
}
</script>